package com.wpre.lotterysystem.service.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: LianBao
 * Date: 2024-12-21
 * Time: 18:39
 */
@Getter
@AllArgsConstructor
public enum ActivityStatusEnum {

    RUNNING(1, "活动正在进行"),
    DONE(2, "活动已完成");


    private final Integer code;
    private final String message;

    public static ActivityStatusEnum forName(String name) {
        for (ActivityStatusEnum statusEnum : ActivityStatusEnum.values()) {
            if (statusEnum.name().equalsIgnoreCase(name)) {
                return statusEnum;
            }
        }
        return null;
    }

}
